#!coding=utf-8
from django.db import models
import settings
from enterprise_basic_information.models import *

#表二
#设计危险化学品生产线基本信息
# class Production_line_basic(models.Model):
#     serial_number = models.CharField(u'生产线编号',max_length = 30)
#     name = models.CharField(u'生产线名称',max_length = 30)
#     production_name = models.CharField(u'产品名称',max_length = 30)
#     raw_materials_name = models.CharField(u'原辅料名称',max_length = 30)
#     process_name = models.CharField(u'工艺方法名称',max_length = 200)
#     chemical_name = models.CharField(u'特征化学污染物名称',max_length = 200)


#表三
#涉及危险化学品生产线信息
class Production_line_information(models.Model):
    serial_number = models.CharField(u'生产线编号',max_length = 30)
    name = models.CharField(u'生产线名称',max_length = 30)

    #production
    production_name = models.CharField(u'产品名称',max_length = 30)
    production_classification = models.CharField(u'产品分类代码',max_length = 30)
    danger = models.CharField(u'是否危险化学品',max_length = 30)
    production_capacity = models.CharField(u'生产能力（年/吨）',max_length = 30)
    output = models.CharField(u'前三年产量',max_length = 30)

    #原料
    raw_material_name = models.CharField(u'原料名称',max_length = 30)
    raw_material_danger = models.CharField(u'是否危险化学品',max_length = 30)
    raw_material_consumption = models.CharField(u'消耗定额(吨/吨产品)',max_length = 30)
    raw_material_usage = models.CharField(u'设计使用量(吨/年)',max_length = 30)
    raw_material_output = models.CharField(u'前三年产量',max_length = 30)

    #辅料
    accessories_name = models.CharField(u'辅料名称',max_length = 30)
    accessories_danger = models.CharField(u'是否危险化学品',max_length = 30)
    accessories_consumption = models.CharField(u'消耗定额(吨/吨产品)',max_length = 30)
    accessories_usage = models.CharField(u'设计使用量(吨/年)',max_length = 30)
    accessories_output = models.CharField(u'前三年产量',max_length = 30)
    accessories_code = models.CharField(u'用途代码',max_length = 30)

    #工艺情况
    process_name = models.CharField(u'工艺方法名称',max_length = 30)
    equipment_state = models.CharField(u'设备状态',max_length = 30)
    time = models.CharField(u'设备投入使用时间',max_length = 30)
    operation_mode = models.CharField(u'操作方式',max_length =30)
    description = models.CharField(u'工艺流程描述',max_length = 200)
    process_chart  =models.FileField(u'工艺流程图',upload_to= 'static\\upload\\%Y\\%m-%d',null=True,blank=True)

    object = models.CharField(u'对象',max_length = 30)
    object_state = models.CharField(u'状态',max_length = 30)
    elimination_time = models.CharField(u'淘汰时间',max_length = 30)


    #生产线三废去向
    wastewater_whereabouts = models.CharField(u'废水去向',max_length = 30)
    wastewater_quantity = models.CharField(u'废水量(吨/年)',max_length = 30)

    exhaust_whereabouts = models.CharField(u'工艺废气去向',max_length = 30)
    exhaust_quantity = models.CharField(u'工艺废气量(万立方米/年)',max_length = 30)

    waste_material_whereabouts = models.CharField(u'危险废物去向',max_length = 30)
    waste_material_unit = models.CharField(u'利用，处置，贮存设施名称或接受单位名称',max_length = 30)
    waste_material_quantity = models.CharField(u'利用，处置，贮存或转移量(吨/年)',max_length = 30)

    #特征化学污染物信息
    chemical_name = models.CharField(u'特征化学污染物名称',max_length = 30)
    ability = models.CharField(u'产污强度(千克/吨产品)',max_length = 30)
    pollution_node = models.CharField(u'产污节点',max_length = 30)
    whereabouts = models.CharField(u'排放去向',max_length = 30)
    enterprise = models.ForeignKey(Enterprise)
